﻿using Spring.Objects.Factory.Xml;

namespace Spring.PureMVC.Config
{
    /// <summary>
    /// Register parser support.
    /// </summary>
    [NamespaceParser(
       Namespace = "http://www.puremvc.org/schema/puremvc",
       SchemaLocationAssemblyHint = typeof(PureMVCNamespaceParser),
       SchemaLocation = "/Spring.PureMVC.Config/spring-puremvc-1.0.xsd"
       )
   ]
    public class PureMVCNamespaceParser : NamespaceParserSupport
    {
        /// <summary>
        /// Initialize parser.
        /// </summary>
        public override void Init()
        {
            RegisterObjectDefinitionParser("registerCommand", new PureMVCRegisterObjectParser());
            RegisterObjectDefinitionParser("registerMediator", new PureMVCRegisterObjectParser());
            RegisterObjectDefinitionParser("registerProxy", new PureMVCRegisterObjectParser());
            RegisterObjectDefinitionParser("sendNotification", new PureMVCRegisterObjectParser());
        }
    }
}
